#region "KeyValuePairWrapper"

/*
 * ####     Developer Name : Wang Yucai
 * 
 * ####     Development Tool : Microsoft VisualStudio 2010 Ultimate Edition
 * 
 * ####     Create Time : 2014-07-14 10:08:49
 * 
 * ####     Namespace : Masterduner.SourceStudio.Practices.DevelopmentLibrary.Collections
 * 
 * ####     Type Name : KeyValuePairWrapper
 * 
 * ####     Full Name : Masterduner.SourceStudio.Practices.DevelopmentLibrary.Collections.KeyValuePairWrapper
 * 
 * ####     Machine Name : GLCHQWYCWINW7
 * 
 * ####     UserName : GUOCOLAND/wangyucai
 * 
 * ####     CLR Version : 4.0.30319.18444
 * 
 * ####     Target Framework Version : 4.0
 */

#endregion

using System;

namespace Masterduner.SourceStudio.Practices.DevelopmentLibrary.Collections
{
    /// <summary>
    /// <para>Masterduner.SourceStudio.Practices.DevelopmentLibrary.Collections.KeyValuePairWrapper</para>
    /// <para>
    /// 重新包装的键值对。
    /// </para>
    /// </summary>
    /// <typeparam name="TKey">键的类型。</typeparam>
    /// <typeparam name="TValue">值的类型。</typeparam>
    /// <remarks>
    /// <para>Target Framework Version : 4.0</para>
    /// </remarks>
    [Serializable]
    public class KeyValuePairWrapper<TKey, TValue>
    {
        private TKey _key;
        private TValue _value;

        #region Key
        /// <summary>
        /// 设置或获取键值。
        /// </summary>
        public virtual TKey Key
        {
            get { return _key; }
            set { _key = value; }
        }
        #endregion

        #region Value
        /// <summary>
        /// 设置或获取值。
        /// </summary>
        public virtual TValue Value
        {
            get { return _value; }
            set { _value = value; }
        }
        #endregion

        #region Constructor

        /// <summary>
        /// <para>构造函数：</para>
        /// <para>初始化一个<see cref="KeyValuePairWrapper{TKey, TValue}" />对象实例。</para>
        /// </summary>
        /// <param name="key"><typeparamref name="TKey"/>类型的键。</param>
        /// <param name="value"><typeparamref name="TValue"/>类型的值。</param>
        public KeyValuePairWrapper(TKey key, TValue value)
        {
            this.Key = key;
            this.Value = value;
        }

        /// <summary>
        /// <para>构造函数：</para>
        /// <para>初始化一个<see cref="KeyValuePairWrapper{TKey, TValue}" />对象实例。</para>
        /// </summary>
        /// <param name="key"><typeparamref name="TKey"/>类型的键。</param>
        public KeyValuePairWrapper(TKey key)
            : this(key, TExpando<TValue>.GetDefault())
        {
        }

        /// <summary>
        /// <para>构造函数：</para>
        /// <para>初始化一个<see cref="KeyValuePairWrapper{TKey, TValue}" />对象实例。</para>
        /// </summary>
        public KeyValuePairWrapper()
        {
        }

        #endregion
    }
}

#region README

/*
 * ####     ©2014 Wang Yucai
 * 
 * ####     Contact me
 *                  
 *                  E-mail : Masterduner@Yeah.net
 *                  Mobile : 13621384677
 *                  QQ : 180261899
 */

#endregion